int find(int key,int a[],int n){
    int i;
    for(i=0;i<n;i++)
        if(a[i]==key)
            return i;
    return -1;
}

int main(){
    int a[]={1,3,5,6,8,8,10,103};
    int key=8;
    int pos=find(key,a,sizeof(a)/sizeof(a[0]));
    if(pos==-1)
        puts("NOT FOUND!");
    else
        printf("%d at pos %d.",key,pos);

}
